package com.aaa.sas.controller;

import com.aaa.pojo.ResultBeansas;
import com.aaa.sas.service.Serviceview;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;
@Controller
@RequestMapping("/view")
@ResponseBody
public class ViewController {
    @Autowired
    Serviceview serviceview;
    @RequestMapping("/findAllsas")
    public ResultBeansas findAllsas() {
        Map<String,Integer> sas = serviceview.findAllsas();
        ResultBeansas resultBeansas = new ResultBeansas();
        resultBeansas.setData(sas);
        return  resultBeansas;
    }
}
